#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int n, m;
vector<int> a;
bool check(int L)
{
	int ans = 0;
	for (int i = 1; i <= n; i++)
	{
		double d = (a[i] - a[i - 1]) * 1.0 / L - 1;
		ans += int(d);
		d -= int(d);
		if (d > 0) {
			ans += 1;
		}
	}
	return ans <= m + 1;
}
int main()
{
	cin >> n >> m;
	a.resize(n + 1, 0);
	for (int i = 1; i <= n; i++) cin >> a[i];
	int l = 1, r = a[n];
	while (l < r)
	{
		int mid = l + r >> 1;
		if (check(mid)) r = mid;
		else l = mid + 1;
	}
	cout << l;
	return 0;
}